﻿<UserControl x:Class="Noboru.Demo.DialogControlPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    >
    
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <Border Width="Auto" Height="26" BorderThickness="1,1,1,1" BorderBrush="#FF000000" VerticalAlignment="Center" Padding="0,0,0,0" Margin="0,0,0,10">
            <Border.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FF000000" Offset="1"/>
                    <GradientStop Color="#FFB3AFAF" Offset="0.003"/>
                </LinearGradientBrush>
            </Border.Background>
            <TextBlock Text="Dialog Control" Foreground="White"  VerticalAlignment="Center" HorizontalAlignment="Left" Margin="6,0,0,0"/>
        </Border>
        <Border BorderBrush="Gray" BorderThickness="1" Grid.Row="1" Width="Auto" CornerRadius="5" Margin="10,0,10,0" Padding="8">
            <Border.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFBEC0C2" Offset="0.994"/>
                    <GradientStop Color="#FFE5E5E6" Offset="0.006"/>
                </LinearGradientBrush>
            </Border.Background>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="80"/>
                    <ColumnDefinition Width="80" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <TextBlock Grid.Row="0" Grid.Column="0" Text="Title" />
                <TextBox x:Name="txtTitle" Grid.Row="1" Grid.Column="0" Width="400" Text="Test dialog" Grid.ColumnSpan="3" />
                <Border Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3" CornerRadius="3" BorderThickness="1" BorderBrush="Gray" Margin="0, 8, 0, 8" Padding="4" Width="270" HorizontalAlignment="Left">
                    <StackPanel Orientation="Horizontal">
                        <RadioButton IsChecked="true" x:Name="RadioNotModal" GroupName="Modal" />
                        <TextBlock Text="Not Modal" Margin="0, 0, 16, 0" />
                        <RadioButton GroupName="Modal" x:Name="RadioModal" />
                        <TextBlock Text="Modal" Margin="0, 0, 16, 0" />
                        <RadioButton GroupName="Modal" x:Name="RadioModalGray" />
                        <TextBlock Text="Modal Gray" Margin="0, 0, 16, 0"/>
                    </StackPanel>
                </Border>
                <TextBlock Grid.Column="0" Grid.Row="3" Text="Width" HorizontalAlignment="Left" />
                <TextBox Grid.Column="0" Grid.Row="4" Text="500" Width="60" HorizontalAlignment="Left" x:Name="txtWidth" />
                <TextBlock Grid.Column="1" Grid.Row="3" Text="Height" HorizontalAlignment="Left" />
                <TextBox Grid.Column="1" Grid.Row="4" Text="300" Width="60" HorizontalAlignment="Left" x:Name="txtHeight" />
                <TextBlock Grid.Column="2" Grid.Row="3" Text="Show Image" HorizontalAlignment="Left" Margin="0,0,18,0" />
                <CheckBox Grid.Row="4" Grid.Column="2" x:Name="ShowImage" />
                <TextBlock Grid.Column="3" Grid.Row="3" Text="Set Image" HorizontalAlignment="Left" />
                <CheckBox Grid.Row="4" Grid.Column="3" x:Name="SetImage" />
                <Image  Grid.Row="4" Grid.Column="3" Source="images/Users.png" Margin="24,4,18,4" d:LayoutOverrides="Width, Height, GridBox" />
                <TextBlock Grid.Column="0" Grid.Row="5" Text="Start Position" HorizontalAlignment="Left" Margin="0,6,0,0" />
                <Border Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" CornerRadius="3" BorderThickness="1" BorderBrush="Gray" Margin="0, 0, 0, 8" Padding="4" Width="340" HorizontalAlignment="Left">
                    <StackPanel Orientation="Vertical">
                        <StackPanel Orientation="Horizontal">
                            <RadioButton x:Name="RadioTopLeft" GroupName="StartPosition" />
                            <TextBlock Text="Top Left     " Margin="0, 0, 16, 0" />
                            <RadioButton GroupName="StartPosition" x:Name="RadioTopCenter" />
                            <TextBlock Text="Top Center     " Margin="0, 0, 16, 0" />
                            <RadioButton GroupName="StartPosition" x:Name="RadioTopRight" />
                            <TextBlock Text="Top Right" Margin="0, 0, 16, 0"/>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <RadioButton x:Name="RadioCenterLeft" GroupName="StartPosition" />
                            <TextBlock Text="Center Left " Margin="0, 0, 16, 0" />
                            <RadioButton IsChecked="true" GroupName="StartPosition" x:Name="RadioCenter" />
                            <TextBlock Text="Center            " Margin="0, 0, 16, 0" />
                            <RadioButton GroupName="StartPosition" x:Name="RadioCenterRight" />
                            <TextBlock Text="Center Right" Margin="0, 0, 16, 0"/>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <RadioButton x:Name="RadioBottomLeft" GroupName="StartPosition" />
                            <TextBlock Text="Bottom Left" Margin="0, 0, 16, 0" />
                            <RadioButton GroupName="StartPosition" x:Name="RadioBottomCenter" />
                            <TextBlock Text="Bottom Center" Margin="0, 0, 16, 0" />
                            <RadioButton GroupName="StartPosition" x:Name="RadioBottomRight" />
                            <TextBlock Text="Bottom Right" Margin="0, 0, 16, 0"/>
                        </StackPanel>
                    </StackPanel>
                </Border>
            </Grid>
        </Border>
        <Button Content="Show Dialog" Grid.Row="2" Width="150" Margin="10" HorizontalAlignment="Left" Name="ShowDialogButton" Click="ShowDialogButton_Click" />
    </Grid>
</UserControl>
